<!-- <template>
  <div>
    <Content
      @InputFn="InputFn"
      @QueryFn="QueryFn"
      @OpenDiaFn="OpenDiaFn"
      @OneBtn="OneBtn"
      @TwoBtn="TwoBtn"
      @CheckDetailsFn="CheckDetailsFn"
      @headerStyleEvent="headerStyleEvent"
    />
  </div>
</template>

<script>
import { MsgRegionalRequest } from '@/api'
import { createNamespacedHelpers } from 'vuex'
const { mapMutations, mapState } = createNamespacedHelpers('publics')
export default {
  data () {
    return {
      page: {
        pageIndex: 1,
        pageSize: 10
      }
    }
  },
  async created () {
    this.nodelist()
  },
  methods: {
    ...mapMutations(['MaOrder', 'MaAddnum', 'MaAeenum', 'MaNum']),
    // 表格头回调函数
    headerStyleEvent () {
      return 'background-color:#f3f6fb'
    },
    async nodelist () {
      const res = await MsgRegionalRequest(this.page)
      console.log(res)
      console.log(res.data.currentPageRecords)
      const dataNew = []
      res.data.currentPageRecords.map(item => {
        const obj = {
          taskCode: item.name,
          innerCode: item.region.name,
          taskType: { typeName: item.businessType.name },
          taskStatusTypeEntity: { statusName: item.ownerName },
          userName: item.addr,
          id: item.id
        }
        dataNew.push(obj)
      })
      // 转换数据
      this.MaOrder({
        currentPageRecords: dataNew,
        totalCount: res.data.totalCount,
        totalPage: res.data.totalPage
      }
      )
    },
    CheckDetailsFn () {

    },
    OneBtn () {

    },
    TwoBtn () {

    },
    OpenDiaFn () {

    },
    QueryFn () {

    },
    InputFn () {

    }
  },
  computed: {
    ...mapState(['PropsData'])
  }
}
</script>

<style></style> -->
